<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <%@include file="WEB-INF/common/meta.jsp" %>
    <meta charset="UTF-8"/>
    <title>2018届高校毕业研究生（硕士、博士）双向选择大会</title>
    <link rel="stylesheet" type="text/css" href="${ctx}/css/style.css"/>
    <script src="${ctx}/js/jquery.js" type="text/javascript" charset="utf-8"></script>
    <script src="${ctx}/js/jquery.validate.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="${ctx}/js/jquery.validate.message_zh.js" type="text/javascript" charset="utf-8"></script>
    <script src="${ctx}js/laydate/laydate.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
        window.history.forward()
        $(function(){
            $("#stpe3").validate({
                rules:{
                    vehicle: "required",
                    trainnumber: "required",
                    station: "required",
                },
                messages:{
                    vehicle: "*必填",
                    trainnumber: "*必填",
                    station: "*必填",
                }
            })
        })
    </script>
    <script>
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?5fc5b86b2fc98940f99c283c245774d8";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>

</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<style>
    select {
        width: 150px;
        height: 26px;
        font-size: 12px;
        margin: 10px;
        background-color: #FFF;
        border: #999 1PX solid;
    }

    input {
        text-align: center;
        padding: 0;
        width: 150px;
    }

    .error{
        color:red;
    }
</style>
<div class="form">
    <form action="${ctx}/step4" method="post" id="stpe3">
        <div>
            <table width="980" height="768" border="0" align="center" cellpadding="0" cellspacing="0" id="__01">
                <tbody>
                <tr>
                    <td>
                        <img src="${ctx}/images/index_01.gif" width="980" height="104" alt=""></td>
                </tr>
                <tr>
                    <td>
                        <img src="${ctx}/images/index_02.gif" width="980" height="59" alt=""></td>
                </tr>
                <tr>
                    <td valign="top" bgcolor="#FFFFFF">
                        <div class="main">
                            <p style="margin:0px 0px 30px 25px;"><img src="${ctx}/images/03.gif"></p>

                            <table width="800" border='1' cellspacing="0" cellpadding="0" class="tab"
                                   style=" margin-left:90px;">
                                <tbody>
                                <tr>
                                    <td colspan="4" align="left" style="padding:10px;"><strong>参会情况</strong></td>
                                </tr>
                                <tr>
                                    <td width="200" align="center"><strong>预定展位数(个)</strong></td>
                                    <td width="200" align="center"><strong>参会人数（人）</strong></td>
                                    <td width="200" align="center"><strong>男（人）</strong></td>
                                    <td width="200" align="center"><strong>女（人）</strong></td>
                                </tr>

                                <tr>
                                    <td align="center"><input type="text" name="postNum" min="1" value="1"
                                                              onkeyup="value=value.replace(/[^\d]/g,'') " maxlength="2">
                                    </td>
                                    <td align="center"><input type="text" name="num" min="1" value="1"
                                                              onkeyup="value=value.replace(/[^\d]/g,'') " maxlength="2">
                                    </td>
                                    <td align="center"><input type="text" name="manNum" min="1" value="1"
                                                              onkeyup="value=value.replace(/[^\d]/g,'') " maxlength="2">
                                    </td>
                                    <td align="center"><input type="text" name="remanNum" min="1" value="1"
                                                              onkeyup="value=value.replace(/[^\d]/g,'') " maxlength="2">
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4" align="left" style="padding:10px;"><strong>住宿安排</strong></td>
                                </tr>
                                <tr>
                                    <td width="200" align="center"><strong>周边酒店选择</strong></td>
                                    <td width="200" align="center"><strong>房间类型（房）</strong></td>
                                    <td width="200" align="center"><strong>价格（元/天）</strong></td>
                                    <td width="200" align="center"><strong>房间数量（间）</strong>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="center">
                                        <select id="s1" name="hotel" >
                                            <option>请选择酒店</option>
                                            <c:forEach items="${hotels}" var="h" >
                                                <option>${h.hotelname}</option>
                                            </c:forEach>
                                        </select>
                                    </td>
                                    <script>
                                        $(function () {
                                            var select1=$("#s2");
                                            $("#s1").change(function () {
                                                    $.ajax({
                                                    type:'post',
                                                    url:'${ctx}/hotel?hname='+$("#s1").val(),
                                                    dataType:'json',
                                                    success: function (data) {
                                                        select1.html("");
                                                        select1.append("<option>房间类型</option>");
                                                        for(var i=0;i<data.length;i++){
                                                            select1.append("<option>"+data[i].type+"</option>");
                                                        }
                                                    }
                                                    })
                                            });
                                            $("#s2").change(function () {
                                                $.ajax({
                                                    type:'post',
                                                    url:'${ctx}/type?type='+$("#s2").val(),
                                                    success:function (data) {
                                                        $("[name=price]").val(data.price+"元");
                                                    }
                                                })
                                            });
                                        });
                                    </script>
                                    <td align="center">
                                        <select id="s2" name="roomid" >
                                            <option>房间类型</option>
                                        </select>
                                    </td>
                                    <td align="center">
                                        <input type="text" name="price" value="" onfocus=this.blur();>
                                        <%--<select id="s3" name="price" >--%>
                                            <%--<option>价格</option>--%>
                                            <%--<option>100元</option>--%>
                                            <%--<option>200元</option>--%>
                                            <%--<option>300元</option>--%>
                                        <%--</select>--%>
                                    </td>
                                    <td align="center"><input type="text" name="roomNum" disabled placeholder="请与选择酒店联系"/></td>
                                </tr>
                                <tr>
                                    <td colspan="4" align="left" style="padding:10px;"><strong>交通车次</strong></td>
                                </tr>
                                <tr>
                                    <td width="200" align="center"><strong>交通工具</strong></td>
                                    <td width="200" align="center"><strong>所乘车次</strong></td>
                                    <td width="200" align="center"><strong>到达站点</strong></td>
                                    <td width="200" align="center"><strong>到站时间</strong></td>
                                </tr>

                                <tr>
                                    <td align="center"><input type="text" name="vehicle" onkeyup="" maxlength="10"></td>
                                    <td align="center"><input type="text" name="trainnumber" onkeyup="" maxlength="10">
                                    </td>
                                    <td align="center"><input type="text" name="station" onkeyup="" maxlength="10"></td>
                                    <td align="center"><input type="text" name="arrivaltime" onkeyup="" onclick="laydate({istime: true,format:'MM-DD hh:mm'})"></td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <p align="center" style="margin:10px;">
                            <input type="submit" class="btn" value="保存并下一步">
                        </p>
                    </td>
                </tr>
                <tr>
                    <td style="background:url(${ctx}/images/index_04.gif) no-repeat #F5F5F5">
                        <div id="footer">
                            <div class="left"><a href="http://www.91student.com/" target="_blank"><img
                                    src="images/91student_logo1.gif" alt="中国研究生人才网" border="0"></a>
                            </div>
                            <div class="right">2001-
                                <script type="text/javascript">
                                    var date = new Date();
                                    var yy = date.getYear();
                                    var year = (yy < 1000) ? yy + 1900 : yy;
                                    year += 0;
                                    document.write(year);
                                </script>&nbsp;&copy;&nbsp;中国研究生人才网版权所有 未经中国研究生人才网书面同意，本站所有内容、信息不得转载。<br>

                                访问浏览本网站，建议使用Internet Explorer 6.0及其以上版本浏览器。
                            </div>
                        </div>

                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </form>
</div>
<script>

</script>
</body>
</html>